package com.code.day07;

public class Test2 {
    public static void main(String[] args) {
        //使用get和set赋值
        JavaObject javaObject = new JavaObject();
        javaObject.setName("lisi");
        javaObject.setAge(18);
        System.out.println(javaObject.getName()+":"+javaObject.getAge());
        String result  = javaObject.toString();
        System.out.println( result);
        //使用有参构造赋值
        JavaObject javaObject1 = new JavaObject("lisi",18);
        System.out.println(javaObject1.getName()+":"+javaObject1.getAge());
        javaObject1.toString();
    }
}
